/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package EJB;

import java.util.HashMap;
import java.util.LinkedList;
import javax.ejb.Stateless;

/**
 *
 * @author admin-pc
 */
@Stateless
public class ChatEJB {

    private String message = "";
    private String name = "";

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static HashMap<String, LinkedList<String>> map = new HashMap<String, LinkedList<String>>();

    public static LinkedList<String> list = new LinkedList<String>();

    public LinkedList<String> setMessages(String message) {
        list.add(message);
        return list;
    }

    public static HashMap<String, LinkedList<String>> setMap(String name, LinkedList<String> list) {
        map.put(name, list);
        return map;
    }

    public String sendMessage(String message) {
        return message;
    }

    // Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Business Method")
}
